/* Modern responsive styles for Task Manager */
:root{
  --bg:#f5f7fb;
  --card:#fff;
  --muted:#6b7280;
  --accent:#2563eb;
  --success:#10b981;
  --danger:#ef4444;
  --radius:12px;
  --container:900px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
}
/* Dark mode overrides (applied when <body> has class 'dark') */
body.dark{
  --bg: #071026;
  --card: #071226;
  --muted: #9aa4b2;
  --accent: #60a5fa;
  --success: #34d399;
  --danger: #fb7185;
  color: #e6eef8;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background:linear-gradient(180deg, var(--bg), #eef2ff 60%);
  color:#0f172a;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  line-height:1.35;
}
.container{max-width:var(--container);margin:0 auto;padding:1rem}
.site-header{padding:1.5rem 0}
.site-header h1{margin:0;font-size:1.5rem}
.tagline{margin:0;color:var(--muted);font-size:0.95rem}

.header-main{display:flex;align-items:center;justify-content:space-between;gap:1rem}
.header-actions{display:flex;align-items:center;gap:0.5rem}
.theme-toggle{background:transparent;border:1px solid rgba(2,6,23,0.06);padding:0.45rem 0.6rem;border-radius:10px;cursor:pointer;font-size:1.05rem}
.theme-toggle[aria-pressed="true"]{background:var(--accent);color:white;border-color:rgba(37,99,235,0.15)}
.theme-toggle:focus{outline:3px solid rgba(37,99,235,0.15)}

/* Smooth transitions for theme change */
body, .todo-section, .task-item{transition:background-color 220ms ease, color 220ms ease, border-color 220ms ease}

.todo-section{background:var(--card);padding:1rem;border-radius:var(--radius);box-shadow:0 6px 18px rgba(2,6,23,0.06)}
.task-form{display:flex;gap:0.5rem;align-items:center;margin-bottom:0.75rem}
.task-form input[type='text']{flex:1;padding:0.6rem 0.75rem;border-radius:10px;border:1px solid #e6e9ef;background:white;font-size:1rem}
.task-form input[type='text']:focus{outline:3px solid rgba(37,99,235,0.15);border-color:var(--accent)}
.task-form button{background:var(--accent);color:white;border:0;padding:0.6rem 0.9rem;border-radius:10px;font-weight:600;cursor:pointer}
.task-form button:focus{outline:3px solid rgba(37,99,235,0.2)}
.link-button{background:transparent;border:0;color:var(--accent);cursor:pointer;font-size:0.95rem}
.link-button:focus{outline:3px solid rgba(37,99,235,0.15)}

.list-wrapper{margin-top:0.5rem}
.task-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:0.5rem}
  .controls{
          display:flex;
          align-items:center;
          gap:1rem;
          justify-content:space-between;
          flex-wrap:wrap;
  }
.task-item{display:flex;align-items:center;gap:0.75rem;padding:0.5rem;border-radius:8px;border:1px solid #eef2ff;background:linear-gradient(180deg,#fff,#fbfdff)}
.task-item .title{flex:1}
.task-item .title button{all:unset;cursor:pointer;font-size:1rem}
.task-item .meta{display:flex;gap:0.5rem;align-items:center}
.task-item .small-btn{background:transparent;border:0;padding:0.25rem 0.5rem;border-radius:6px;cursor:pointer}
.task-item .small-btn:focus{outline:3px solid rgba(2,6,23,0.06)}
.task-item.completed{opacity:0.7;text-decoration:line-through;color:var(--muted)}
.empty-state{text-align:center;color:var(--muted);padding:1rem}

.filters{display:flex;gap:0.5rem;align-items:center}
.filter-btn{background:transparent;border:1px solid transparent;padding:0.4rem 0.6rem;border-radius:8px;cursor:pointer;font-weight:600;color:var(--accent)}
.filter-btn[aria-pressed="true"]{background:var(--accent);color:white;border-color:rgba(37,99,235,0.15)}
.filter-btn:focus{outline:3px solid rgba(37,99,235,0.15)}
.actions{display:flex;gap:0.5rem;align-items:center}
/* Accessibility helper */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Responsive */
@media (max-width:600px){
  .task-form{flex-direction:column;align-items:stretch}
  .task-form button{width:100%}
  .site-header h1{font-size:1.25rem}
}

/* Footer */
.site-footer{margin-top:1rem;padding:0.5rem 0;color:var(--muted);font-size:0.9rem;text-align:center}
